<%@page import="com.dfhc.rm.rmauthorizeresource.IAuthorizeResourceConstants" %>
<%@page import="com.dfhc.util.StringHelper"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>

<title>添加rm_authorize_resource </title>

<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>


<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-rmauthorizeresource-add">
	   <input type="hidden" id="id" name="id" value="${bean.id}">
	   <input type="hidden" id="authorizeId" name="authorizeId" value="${authorizeId}">							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("oldResourceId")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.oldResourceId}" placeholder="" id="oldResourceId" name="oldResourceId"/>			
	    </dfhc:div>	    		 
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("defaultAccess")%>：</dfhc:title>	    
			<dfhc:div h_ui_div_label_div>
				<dfhc:select templateId="h_ui_select" size="1" name="defaultAccess" id="defaultAccess" pleaseSelect="1" defaultValue="${bean.defaultAccess}" sqlOption="code" code="RM_YES_NOT" />				
			</dfhc:div>
	  </dfhc:div>
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("defaultIsAffixData")%>：</dfhc:title>	    
			<dfhc:div h_ui_div_label_div>
				<dfhc:select templateId="h_ui_select" size="1" name="defaultIsAffixData" id="defaultIsAffixData" pleaseSelect="1" defaultValue="${bean.defaultIsAffixData}" sqlOption="code" code="RM_YES_NOT" />				
			</dfhc:div>
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("defaultIsRecursive")%>：</dfhc:title>	    
			<dfhc:div h_ui_div_label_div>
				<dfhc:select templateId="h_ui_select" size="1" name="defaultIsRecursive" id="defaultIsRecursive" pleaseSelect="1" defaultValue="${bean.defaultIsRecursive}" sqlOption="code" code="RM_YES_NOT" />				
			</dfhc:div>
	  </dfhc:div>
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("defaultAccessType")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.defaultAccessType}" placeholder="" id="defaultAccessType" name="defaultAccessType"/>			
	    </dfhc:div>	    		 
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("totalCode")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.totalCode}" placeholder="" id="totalCode" name="totalCode"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("name")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.name}" placeholder="" id="name" name="name"/>			
	    </dfhc:div>	    		 
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("usableStatus")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.usableStatus}" placeholder="" id="usableStatus" name="usableStatus"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("modifyDate")%>：</dfhc:title>	    
            <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_timestamp_input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="${bean.modifyDate}" id="modifyDate" name="modifyDate" readonly="true" />
	    </dfhc:div>	    		 
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("modifyIp")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.modifyIp}" placeholder="" id="modifyIp" name="modifyIp"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("modifyUserId")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.modifyUserId}" placeholder="" id="modifyUserId" name="modifyUserId"/>			
	    </dfhc:div>	    		 
	    <dfhc:title templateId="h_ui_label_title_2"><%=IAuthorizeResourceConstants.TABLE_COLUMN_DISPLAY.get("constraint")%>：</dfhc:title>	    
	    <dfhc:div h_ui_div_label_div>	        
			<dfhc:input templateId="h_ui_input" value="${bean.constraint}" placeholder="" id="constraint" name="constraint"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
	 <dfhc:div templateId="h_ui_div_row_cl">
		<dfhc:div templateId="h_ui_div_pop_up_button2">
			<dfhc:button templateId="h_ui_submit_button" />
		</dfhc:div>
	</dfhc:div>
	</form>
</article>


<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('<%=IAuthorizeResourceConstants.TABLE_NAME%>'));
	</c:if>


	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});

$("#form-rmauthorizeresource-add").validate({
		rules:{
			defaultAccess:{			
				required:true,
				minlength:1,
				maxlength:1
			},
			defaultIsAffixData:{			
				required:true,
				minlength:1,
				maxlength:1
			},
			defaultIsRecursive:{			
				required:true,
				minlength:1,
				maxlength:1
			},
			defaultAccessType:{			
				required:true,
				minlength:1,
				maxlength:1000
			},
			totalCode:{			
				maxlength:200
			},
			name:{			
				maxlength:200
			},
			usableStatus:{			
				maxlength:1
			},
			modifyDate:{			
			},
			modifyIp:{			
				maxlength:45
			},
			constraint:{			
			}
		},
 		messages: {
			defaultAccess:{
		        required: "请输入DEFAULT_ACCESS",
		        minlength: "DEFAULT_ACCESS至少由1个字母组成",
		        maxlength: "DEFAULT_ACCESS最大长度为1个字母"
	           },
			defaultIsAffixData:{
		        required: "请输入DEFAULT_IS_AFFIX_DATA",
		        minlength: "DEFAULT_IS_AFFIX_DATA至少由1个字母组成",
		        maxlength: "DEFAULT_IS_AFFIX_DATA最大长度为1个字母"
	           },
			defaultIsRecursive:{
		        required: "请输入DEFAULT_IS_RECURSIVE",
		        minlength: "DEFAULT_IS_RECURSIVE至少由1个字母组成",
		        maxlength: "DEFAULT_IS_RECURSIVE最大长度为1个字母"
	           },
			defaultAccessType:{
		        required: "请输入DEFAULT_ACCESS_TYPE",
		        minlength: "DEFAULT_ACCESS_TYPE至少由1个字母组成",
		        maxlength: "DEFAULT_ACCESS_TYPE最大长度为1000个字母"
	           },
			totalCode:{
		        maxlength: "TOTAL_CODE最大长度为200个字母"
	           },
			name:{
		        maxlength: "NAME最大长度为200个字母"
	           },
			usableStatus:{
		        maxlength: "USABLE_STATUS最大长度为1个字母"
	           },
			modifyDate:{
	           },
			modifyIp:{
		        maxlength: "MODIFY_IP最大长度为45个字母"
	           },
			constraint:{
	           }
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			var url = getRootPath()+"/rmauthorizeresource/insert?jsguid="+$('#id').val();
			</c:if>
			<c:if test="${not empty bean}"> 
			var url = getRootPath()+"/rmauthorizeresource/update?jsguid="+$('#id').val();
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-rmauthorizeresource-add").serialize()); 		    		    		
		}
	});	

});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
